import Request from '@/utils/request.js'
import md5 from '@/utils/md5.js'
let request = new Request().http

//全局定义请求头
export default {
	GetMyInfo: function(){
		return request({
			url: "/getCurrentUser", //请求头
			method: "GET", //请求方式
		})
	},
	updateMySelf: function(userid, loginmsg, credential){
		var vo = {
			loginmsg: loginmsg,
			credential: credential == ""?"":md5.hexMD5(credential),
			userid: userid
		}
		return request({
			url: "/user/editSelf", //请求头
			method: "POST", //请求方式,
			data: {userkey: JSON.stringify(vo)}
		})
	}
}